package org.mspring.mlog.entity;

import java.util.Date;
import org.mspring.nbee.db.annotation.AutoIncrement;
import org.mspring.nbee.db.annotation.Col;
import org.mspring.nbee.db.annotation.Id;
import org.mspring.nbee.db.annotation.Mappable;
import org.mspring.nbee.db.entity.BaseEntity;
import org.mspring.nbee.db.orm.EntityField;

/**
 *
 * @author Gao Youbo
 * @since 2016-06-05 10:13:20
 */
@Mappable
public class UserEntity extends BaseEntity {

    @Id
    @AutoIncrement
    @Col(length = 19)
    private Long id;
    @Col(nullable = false, length = 32)
    private String nickname;
    @Col(nullable = false, length = 32)
    private String username;
    @Col(nullable = false, length = 128)
    private String password;
    @Col(nullable = false, length = 128)
    private String email;
    @Col(length = 1024)
    private String avatar;
    @Col(length = 1024)
    private String smallAvatar;
    @Col(nullable = false, length = 1)
    private boolean deleted;
    @Col(nullable = false, length = 19)
    private Date createTime;
    @Col(nullable = false, length = 19)
    private Date updateTime;

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getNickname() {
        return this.nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getUsername() {
        return this.username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return this.password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return this.email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getAvatar() {
        return this.avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getSmallAvatar() {
        return this.smallAvatar;
    }

    public void setSmallAvatar(String smallAvatar) {
        this.smallAvatar = smallAvatar;
    }

    public boolean getDeleted() {
        return this.deleted;
    }

    public void setDeleted(boolean deleted) {
        this.deleted = deleted;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return this.updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public static class Fields {
        public static final EntityField id = new EntityField("id", "id", Long.class, 19, false);
        public static final EntityField nickname = new EntityField("nickname", "nickname", String.class, 32, false);
        public static final EntityField username = new EntityField("username", "username", String.class, 32, false);
        public static final EntityField password = new EntityField("password", "password", String.class, 128, false);
        public static final EntityField email = new EntityField("email", "email", String.class, 128, false);
        public static final EntityField avatar = new EntityField("avatar", "avatar", String.class, 1024, true);
        public static final EntityField smallAvatar = new EntityField("smallAvatar", "small_avatar", String.class, 1024, true);
        public static final EntityField deleted = new EntityField("deleted", "deleted", boolean.class, 1, false);
        public static final EntityField createTime = new EntityField("createTime", "create_time", Date.class, 19, false);
        public static final EntityField updateTime = new EntityField("updateTime", "update_time", Date.class, 19, false);
    }
}
